﻿using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;

namespace CodeCounsel.SharePoint.NavigationService.NavigationPart
{
    [ToolboxItemAttribute(false)]
    public class NavigationPart : WebPart
    {
        protected override void Render(
            HtmlTextWriter writer)
        {
            NavigationManager manager = new NavigationManager(SPServiceContext.Current);
            writer.Write(manager.GetNavigationInformation() ?? "Not connected");
        }
    }
}
